package com.erp.erp_servers.ProductCatalog.imp;

import com.erp.erp_dao.ProductCatalog.IProductCatalogDAO;
import com.erp.erp_entitys.ProductCatalog.ProductCatalogEntity;
import com.erp.erp_entitys.ProductCatalog.ProductCatalogExample;
import com.erp.erp_servers.ProductCatalog.IProductCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImpProductCatalogService implements IProductCatalogService {
    @Autowired
    IProductCatalogDAO productCatalogDAO;

    @Override
    public long countByExample(ProductCatalogExample example) {
        return productCatalogDAO.countByExample(example);
    }

    @Override
    public int deleteByExample(ProductCatalogExample example) {
        return productCatalogDAO.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return productCatalogDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(ProductCatalogEntity record) {
        return productCatalogDAO.insert(record);
    }

    @Override
    public int insertSelective(ProductCatalogEntity record) {
        return productCatalogDAO.insertSelective(record);
    }

    @Override
    public List<ProductCatalogEntity> selectByExample(ProductCatalogExample example) {
        return productCatalogDAO.selectByExample(example);
    }

    @Override
    public ProductCatalogEntity selectByPrimaryKey(Integer id) {
        return productCatalogDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(ProductCatalogEntity record, ProductCatalogExample example) {
        return productCatalogDAO.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(ProductCatalogEntity record, ProductCatalogExample example) {
        return productCatalogDAO.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(ProductCatalogEntity record) {
        return productCatalogDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ProductCatalogEntity record) {
        return productCatalogDAO.updateByPrimaryKey(record);
    }

    @Override
    public List<String> queryIdByCode(String code) {
        return productCatalogDAO.queryIdByCode(code);
    }

    @Override
    public ProductCatalogEntity selectByPrimary(String code) {
        return productCatalogDAO.selectByPrimary(code);
    }
}
